/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package marsaMaroc.dao;

import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.persistence.Query;
import marsaMaroc.model.Client;

/**
 *
 * @author Administrateur
 */
public class RolesDAO{

    EntityManagerFactory emf = Persistence.createEntityManagerFactory("Marsa-MarocPU") ;
    EntityManager em;
    
    public List<Client> getAllRoles() {
     Query q = em.createQuery("select e FROM Roles e") ;
     return q.getResultList();  
    }
    
}
